package org.csu.demo.service.impl;

import org.csu.demo.common.CommonResponse;
import org.csu.demo.domain.Inventory;
import org.csu.demo.persistence.InventoryMapper;
import org.csu.demo.service.InventoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("inventoryService")
public class InventoryServiceImpl implements InventoryService {
    @Autowired
    private InventoryMapper inventoryMapper;

    public CommonResponse<Inventory> getInventoryByItemId(String itemId) {
        Inventory inventory = inventoryMapper.selectById(itemId);
        System.out.println(inventory);
        return CommonResponse.createForSuccess(inventory);
    }
}
